package it.com.cci.strategy_pattern;

/**
 * @author Lefnmg
 * @Description:
 * @date 2018/3/24
 */
/*
 继承 方法, 属性
 */
public class MallardDuck extends Duck {
    public MallardDuck() {
        flyBehavior = new FlyWithWings();
        quackBehavior = new Quack();
    }

    @Override
    public void display() {//外观抽象方法 重写
        System.out.println("绿头鸭");
    }

}
